#include <graphics/shaderuniforms.h>


namespace yam3d
{
namespace graphics
{
    ShaderUniform::ShaderUniform()
    : core::Object(__FUNCTION__)
    {
    }

    ShaderUniform::~ShaderUniform()
    {
    }

    ShaderUniforms::ShaderUniforms()
    : core::Object(__FUNCTION__)
    , m_uniforms()
    {
    }

    ShaderUniforms::~ShaderUniforms()
    {
    }

    void ShaderUniforms::applyValues( render::ShaderProgram* shader )
    {
        for( HashType::iterator it = m_uniforms.begin(); it != m_uniforms.end(); ++it )
        {
            assert( *it != 0 );
            assert( it.value() != 0 );
            it.value()->setUniformValue(shader, it.key());
        }
    }

}
}
